<!DOCTYPE html>
<html>
    <head>
          <meta charset="utf-8" />
          <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />    //自适应
          <title>太原科技大学</title>
          <script src="jquery.min.js"></script>
          <script src="bootstrap.min.js"></script>
          <link href="bootstrap.min.css" rel="stylesheet" />
         <title></title>
             <script>
  	//JavaScript代码
  	              function calc(){
  		          salary=$("#sal").val();//jQuery
  		//"6000"
  		          salnum=parseInt(salary);
  		          ylgr=salnum*0.08;
  		          ylgs=salnum*0.2;
  		          $("#ylgr").html(ylgr);
  		          $("#ylgs").html(ylgs);
  		          ybgr=salnum*0.02;
  		          ybgs=salnum*0.06;
  		           $("#ybgr").html(ybgr);
  		          $("#ybgs").html(ybgs);
  		          shiye = salnum*0.005;
  		          $("#shiye").html(shiye);
  	            }
             </script>
    </head>
 <body>
  <table class ="table table-bordered table-striped">
           <tr class ="text-centry ">
                    <td>工资</td>
                    <td colspan="3"><input calss="form-control"type="text"id="sal"></td>
                    <td><button onclick="calc()" class="btn btn-danger btn-block">计算<tton></td>
            </tr>
           <tr class="bg-primary text-center">
               <td>险种</td>
               <td>个人%</td>
               <td>个人</td>
               <td>公司%</td>
               <td>公司</td>
           </tr>
           <tr class="text-center">
                <td>养老</td>
                <td>8%</td>
                <td id="ylgr"></td>
               <td>20%</td>
               <td id="ylgs"></td>
           </tr>
          <tr class="text-center">
              <td>医疗</td>
              <td>2%</td>
              <td id="ybgr"></td>
              <td>6%</td>
              <td id="ybgs"></td>
           </tr>
          <tr class="text-center">
              <td>失业</td>
              <td>0.5%</td>
              <td id="shiye"></td>
              <td>1.5%</td>
             <td id="shiys"></td>
           < /tr>
        <tr class="text-center">
           <td>工伤</td>
           <td></td>
           <td></td>
           <td>0.5%</td>
           <td></td>
         </tr>
       <tr class="text-center">
           <td>发育</td>
           <td></td>
           <td></td>
           <td>0.5%</td>
           <td></td>
           </tr>
        <tr class="text-center">
            <td>公积金</td>
            <td>12%</td>
            <td></td>
            <td>12%</td>
           <td></td>
        </tr>
        <tr class="text-center">
            <td>合计</td>
            <td>个人合计</td>
            <td></td>
            <td>公司合计</td>
           <td></td>
       </tr>
       <tr class="text-center">
           <td>总额</td>
           <td colspan="4"></td>
       </tr>
  </table>

 </body>
</html>
